//
//  COReportTableViewCell.swift
//  CocoProject
//
//  Created by Ruthless on 2023/9/6.
//

import UIKit

class COReportTableViewCell: UITableViewCell {

    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        selectionStyle = .none
        backgroundColor = .rgba(17, 7, 41, 1)
        contentView.addSubview(button)
        contentView.addSubview(lineView)
        
        button.snp.makeConstraints { make in
            make.left.right.top.equalToSuperview()
            make.bottom.equalTo(lineView.snp.top).offset(0)
        }
        
        lineView.snp.makeConstraints { make in
            make.left.right.bottom.equalToSuperview()
            make.height.equalTo(1)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    private(set) lazy var button: UIButton = {
        let btn = UIButton()
        btn.setTitleColor(.rgba(152, 48, 255, 1), for: .selected)
        btn.setTitleColor(.white, for: .normal)
        btn.titleLabel?.font = .medium(20)
        btn.isUserInteractionEnabled = false
        return btn
    }()
    
    private lazy var lineView: UIView = {
        let view = UIView()
        view.backgroundColor = .white.withAlphaComponent(0.15)
        return view
    }()
}
